<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Hello World!</title>

</head>
<body>

<h4>组树列表：</h4>
<ul>
    <!-- 递归  宏定义 -->
      <#macro bpTree list>
          <#if list?? && list?size gt 0>
              <#list list as bean>
                  <#if bean.list?? && bean.list?size gt 0>
        <li class="treeview">
            <a href="javascript:void(0)">
                <i  aria-hidden="true"></i> <span>${bean.group_name}</span>
                <i class="fa fa-angle-left pull-right" aria-hidden="true"></i>
            </a>
            <ul>
            <@bpTree list=bean.list />
            </ul>
        </li>
                  <#else>
            <li><a href="javascript:void(0)" ><i  aria-hidden="true"></i>${bean.group_name}</a></li>
                  </#if>
              </#list>
          </#if>
      </#macro>
    <!-- 调用宏 生成递归树 -->
       <@bpTree list=result />
</ul>

</body>
</html>